Existing (structured) meshes

This document provides a brief description of the various structured meshes that are distributed with the library. Most of these meshes were developed for specific example codes but we expect them to be useful in other problems too. Many of the meshes exist in many different variants, usually constructed by multiple inheritance. When meshes are relatively trivial variations of each other, e.g. a basic mesh and its refineable equivalent, we only list the mesh once. The detailed documentation for the mesh (obtained by following the link) contains the full inheritance diagram, showing the mesh's own base classes and any meshes that are derived from it. For each mesh, we provide a link to a fully-documented example problem that illustrates its use.

We stress that the key feature of any given mesh is its topology, rather than the specific shape for which it was originally developed. For instance, oomph-lib does not provide a mesh for the discretisation of an annular domain with quadrilateral elements. However, such a mesh is trivial to construct by deriving it from, e.g., the SimpleRectangularQuadMesh (a mesh that discretises a rectangular domain), and then adjusting its nodal positions. Consult the example in the (Not-So-)Quick-Guide for details.



Reminder: General conventions to facilitate the re-use of meshes

Since mesh generation tends to be most tedious part of any numerical simulation, oomph-lib's overall data structure, described in detail elsewhere, aims to facilitate the re-use of meshes in many different applications. For this purpose most specific FiniteElements in oomph-lib are derived by multiple inheritance, combining a "geometric" FiniteElement (e.g. a line/quadrilateral/brick-shaped element from the QElement<DIM,NNODE_1D> family) with an equations class (such as PoissonEquations<DIM>) that implements the weak form of a specific PDE. For instance, oomph-lib's quadrilateral nine-node Poisson element, QPoissonElement<2,3>, is derived from the PoissonEquations<2> equations class and the QElement<2,3> geometric FiniteElement.

The mesh generation process is mainly concerned with the geometric properties of the mesh's constituent FiniteElements (their topology, number of nodes, etc.) which are defined by the geometric FiniteElement. This makes it possible to use a mesh that was originally developed for the solution of a Poisson equation with a QPoissonElement<2,NNODE_1D>, say, for the solution of an advection-diffusion problem with a QAdvctionDiffusionElement<2,NNODE_1D> since both elements are derived from the same geometric FiniteElement. Only two aspects of the mesh generation process require information that is not provided by the geometric FiniteElement:

The meshes used in our example codes (and all the meshes listed below) have a common structure that allows the required information to be become available to the mesh constructor:

  1. All meshes are templated by the element type, ELEMENT.

  2. The final argument of all mesh constructors is a pointer to a TimeStepper. We provide a default for this argument – a pointer to the Steady<0> timestepper, defined (as static member data) in the Mesh base class.

The availability of the template parameter allows the mesh generator to build elements of the required type. Nodes are generally built by the FiniteElement::construct_node(...) function whose arguments are the Node's local node number within the current element, and a pointer to the timestepper. These arguments provide all the information that is required to build Nodes with the right number of values (as required by the element) and history values (as required by the TimeStepper). When the function FiniteElement::construct_node(...) is called, it creates the new Node, stores a pointer to the newly created Node in the FiniteElement's own lookup scheme, and returns that pointer. This allows the pointer to the newly created Node to be stored in the Mesh's own lookup scheme for its constituent Nodes. The (Not-So-)Quick-Guide contains a section that explains how to write simple meshes.



Mesh FAQ

When using a mesh that was originally developed for a different application, it is sometimes necessary establish the node/element/boundary numbering scheme employed by the mesh writer. While we generally assume that the mesh writer will have carefully documented his/her code, here is what to do if he/she hasn't:

With this information it should be straightforward to use any of the meshes listed below in one of your own problems. The example code listed next to each mesh illustrates its use in an actual driver code. If you develop a new mesh, let us know! If it is written according to oomph-lib's coding standards, we'll be delighted to include it into the library.



Mesh list

Mesh Representative Mesh plot
OneDMesh<ELEMENT>

  • This mesh can be used with all FiniteElements that are derived from the geometric finite element QElement<1,NNODE_1D>.
  • This mesh forms the basis for numerous derived meshes.
  • A refineable version of this mesh exists.
Example driver code:
one_d_mesh.gif
SimpleRectangularQuadMesh<ELEMENT>

  • This mesh can be used with all FiniteElements that are derived from the geometric finite element QElement<2,NNODE_1D>.
  • This mesh forms the basis for numerous derived meshes.
Example driver code:
simple_rectangular_quadmesh.gif
RectangularQuadMesh<ELEMENT>

  • This is a slightly more sophisticated version of the SimpleRectangularQuadMesh discussed above; it allows for non-uniform spacing of the nodes, and periodicity in the x and y-directions.
  • This mesh can be used with all FiniteElements that are derived from the geometric finite element QElement<2,NNODE_1D>.
  • This mesh forms the basis for numerous derived meshes.
  • A refineable version of this mesh exists.
Example driver code:
simple_rectangular_quadmesh.gif
TwoDAnnularMesh<ELEMENT>

  • This is a "wrapped around" version of RectangularQuadMesh discussed above. It can either be used as a complete annulus (in which case periodicity is enforced) or a gap can appear in the annulus.
  • This mesh can be used with all FiniteElements that are derived from the geometric finite element QElement<2,NNODE_1D>.
  • A refineable version of this mesh exists.
Example driver code:
annular_meshes.gif
ChannelWithLeafletMesh<ELEMENT>

  • Mesh for the simulation of flow in a 2D channel that is partially occluded by a moving leaflet.
  • Leaflet must be represented by a GeomObject
  • Nodes along the leaflet are duplicated to allow for a pressure jump across the leaflet even for discretisations that impose continuous pressure distributions across element boundaries.
  • This mesh can be used with all FiniteElements that are derived from the geometric finite element QElement<2,NNODE_1D>.
  • This mesh forms the basis for numerous derived meshes.
  • A refineable version of this mesh exists.
Example driver code:
channel_with_leaflet_mesh.gif
SimpleRectangularTriMesh<ELEMENT>

  • This is a simple structured mesh made of triangular elements.
  • This mesh can be used with all FiniteElements that are derived from the geometric finite element TElement<2,NNODE_1D>.
Example driver code:
simple_rectangular_trimesh.gif
FishMesh<ELEMENT>

  • This mesh can be used with all FiniteElements that are derived from the geometric finite element QElement<2,NNODE_1D>.
  • This mesh forms the basis for numerous derived meshes.
  • The curvilinear boundaries are represented by a GeomObject and the mesh has a Domain representation, allowing a MacroElement - based node update.
  • There is also a version of the mesh that performs the node update in response to changes in the domain boundary by an algebraic node update.
  • A refineable version of this mesh exists.
Example driver code:
fish_mesh.gif
CollapsibleChannelMesh<ELEMENT>

  • This mesh can be used with all FiniteElements that are derived from the geometric finite element QElement<2,NNODE_1D>.
  • This mesh forms the basis for numerous derived meshes
  • The curvilinear boundary is represented by a GeomObject and the mesh has a Domain representation, allowing a MacroElement - based node update.
  • There is also a version of the mesh that performs the node update in response to changes in the domain boundary by an algebraic node update.
  • A refineable version of this mesh exists.
Example driver code:
collapsible_channel_mesh.gif
CylinderWithFlagMesh<ELEMENT>

  • This Mesh was mainly developed for the solution of Turek & Hron's FSI benchmark problems. The curvilinear boundaries of the cylinder and the "flag" are represented by GeomObjects.
  • A refineable version of the mesh exists.
  • The node-update in response to changes in the shape of the "flag" can be performed by a version based on an AlgebraicMesh or using a Domain/MacroElement - based node update.
  • The bulk elements have to be derived from the geometric finite element QElement<2,NNODE_1D>.
Example driver code:
cylinder_with_flag_mesh.gif
BrethertonSpineMesh<ELEMENT>

  • This SpineMesh was mainly developed for the simulation of the Bretherton problem but it can, of course, also be used in other problems. The mesh topology would be suitable for the simulation of flows in a bifurcating channel, say.
  • The bulk elements have to be derived from the geometric finite element QElement<2,NNODE_1D>.
Example driver code:
bretherton_spine_mesh.gif
QuarterCircleSectorMesh<ELEMENT>

  • This mesh can be used with all FiniteElements that are derived from the geometric finite element QElement<2,NNODE_1D>.
  • This mesh forms the basis for numerous derived meshes
  • The curvilinear boundary is represented by a GeomObject and the mesh has a Domain representation, allowing a MacroElement - based node update.
  • There is also a version of the mesh that performs the node update in response to changes in the domain boundary by an algebraic node update.
  • A refineable version of this mesh exists.
Example driver code:
quarter_circle_sector_mesh.gif
SimpleCubicMesh<ELEMENT>

  • This mesh can be used with all FiniteElements that are derived from the geometric finite element QElement<3,NNODE_1D>.
  • A refineable version of this mesh exists.
Example driver code:
simple_cubic_mesh.gif
SimpleCubicTetMesh<ELEMENT>

  • This is a simple structured mesh for tet elements.
  • This mesh can be used with all FiniteElements that are derived from the geometric finite element TElement<3,NNODE_1D>.
Example driver code:
simple_cubic_tetmesh.gif
QuarterTubeMesh<ELEMENT>

  • This mesh can be used with all FiniteElements that are derived from the geometric finite element QElement<3,NNODE_1D>.
  • This mesh forms the basis for numerous derived meshes
  • The curvilinear boundary is represented by a GeomObject and the mesh has a Domain representation, allowing a MacroElement - based node update.
  • There is also a version of the mesh that performs the node update in response to changes in the domain boundary by an algebraic node update.
  • A refineable version of this mesh exists.
Example driver code:
quarter_tube_mesh.gif
TubeMesh<ELEMENT>

  • This mesh can be used with all FiniteElements that are derived from the geometric finite element QElement<3,NNODE_1D>.
  • This mesh forms the basis for numerous derived meshes that describe topologically-tube-shaped domains.
  • The entire domain is represented by a GeomObject and the mesh has a Domain representation, allowing a MacroElement - based node update.
  • A refineable version of this mesh exists.
Example driver code:
tube_mesh.gif
EighthSphereMesh<ELEMENT>

  • This mesh can be used with all FiniteElements that are derived from the geometric finite element QElement<3,NNODE_1D>.
  • A refineable version of this mesh exists.
Example driver code:
eighth_sphere_mesh.gif


PDF file

A pdf version of this document is available.